package com.lh.controller;

import com.lh.annotation.SystemLog;
import com.lh.domian.ResponseResults;
import com.lh.domian.entity.User;
import com.lh.service.LoginService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author LuoHang
 * @Date 2022-08-26 22:23
 **/
@RestController
public class LoginController {
    @Resource
    private LoginService loginService;

    @PostMapping("/login")
    @SystemLog(businessName = "用户登录")
    public ResponseResults login(@RequestBody User user){
        return loginService.login(user);
    }
}
